﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.Xna.Framework;
using kb_24_the_game;


namespace TestProject1
{
    [TestClass]
    public class SpelerTest
    {
        GameTime time;
        Obstakel kegel;
        
        [TestInitialize]
        public void Setup()
        {
            time = new GameTime();
            kegel = new Obstakel();
            kegel.position = new Vector2(2400, 0);
            kegel.unitTestRect = new Rectangle((int)kegel.position.X, (int)kegel.position.Y, 15, 50);
            kegel.valTijd = 2;
        }

        [TestMethod]
        public void TestVallen()
        {
            kegel.ValObstakel(2400);
            kegel.Update(time);
            Assert.AreEqual(kegel.position, new Vector2(2400, 0));
            kegel.Update(time);
            kegel.ValObstakel(2400);
            Assert.AreEqual(kegel.position, new Vector2(2400, 1));

        }
    }
}
